package com.cln.treewalker;


public abstract class ATraverser implements IVisitor {

	protected StringBuffer result = new StringBuffer();

	

	public void visitChild(TreeNode childNode) {
		if ( childNode!= null) {
			childNode.accept(this);
		}
	}

	public void visitRoot(TreeNode root) {
		getResult().append(root.getTreeNodeString());
	}

	public StringBuffer getResult() {
		return result;
	}

}